import 'package:json_annotation/json_annotation.dart';

part 'userModel.g.dart';


@JsonSerializable()
class UserModel extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'data')
  UserInfo data;

  @JsonKey(name: 'msg')
  String msg;

  UserModel(this.code,this.data,this.msg,);

  factory UserModel.fromJson(Map<String, dynamic> srcJson) => _$UserModelFromJson(srcJson);

}


@JsonSerializable()
class UserInfo extends Object {

  @JsonKey(name: 'createTime')
  String createTime;

  @JsonKey(name: 'img')
  String img;

  @JsonKey(name: 'key')
  String key;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'other')
  String other;

  @JsonKey(name: 'other2')
  String other2;

  @JsonKey(name: 'passwd')
  String passwd;

  @JsonKey(name: 'phone')
  String phone;

  @JsonKey(name: 'text')
  String text;

  UserInfo(this.createTime,this.img,this.key,this.name,this.other,this.other2,this.passwd,this.phone,this.text,);

  factory UserInfo.fromJson(Map<String, dynamic> srcJson) => _$UserInfoFromJson(srcJson);

}


